<?php echo $this->render('collection/site/_tab.phtml');?>
<?php $this->headStyle()->captureStart();?>
td.icon a {height:48px;background:#fff;border:1px solid #eee;}
<?php $this->headStyle()->captureEnd();?>
<div class="body">
	<table class="list">
		<tr>
			<th class="narrow"></th>
			<th class="narrow">KEY</th>
			<th><?php echo $this->language('TITLE');?></th>
			<th><?php echo $this->language('URL');?></th>
			<th class="time"><?php echo $this->language('CREATION TIME');?></th>
			<th class="narrow"></th>
		</tr>
		<?php foreach($this->list AS $key => $row) { ?>
		<tr>
			<td class="icon"><a href="<?php echo $row->getCover()->getLarge(false);?>" target="_blank"><img src="<?php echo $row->getCover()->getSmall(false);?>" /></a></td>
			<td><?php echo $row->getLink();?><?php if(!$row->getIsActive()) { ?><br/><em class="red">Invalid</em><?php } ?></td>
			<td<?php if(!$row->getIsActive()) {echo ' class="gray"';}?>>
				<h3><a href="<?php echo $this->url('collection/site/edit', array('id' => $row->getId()));?>"><?php echo $this->escape($row->getTitle());?></a></h3>
				<strong>Charset</strong>: <?php echo $row->getCharset();?>
				<p class="toolbar">
					<a href="<?php echo $this->url('collection/site/edit', array('id' => $row->getId()));?>"><?php echo $this->language('Edit');?>»</a>
					<a href="<?php echo $this->url('collection/item/index', array('site_id' => $row->getId()));?>"><?php echo $this->language('Item');?>»</a>
					<a href="<?php echo $this->url('collection/site/collect', array('id' => $row->getId()));?>"><?php echo $this->language('Collect');?>»</a>
				</p>
			</td>
			<td><a href="<?php echo $row->getUrl();?>" target="_blank"><?php echo $row->getUrl();?></a></td>
			<td class="time"><?php echo $this->date($row->getCreationtime());?></td>
			<td></td>
		</tr>
		<?php } ?>
		<?php if(count($this->list) <= 0) {?>
		<tr>
			<td colspan="6" class="nohover">
				<div class="msg">
					<div class="common error" style="border:0;background:#fff;">
						<i class="icon"></i>
						<h4>STOP</h4>
						<div class="msg-bd">
							No SITE found. 
							<a href="<?php echo $this->url('collection/site/addnew');?>"><?php echo $this->language('Create');?>..</a>
						</div>
					</div>
				</div>
			</td>
		</tr>
		<?php } ?>
	</table>
</div>
<div class="body">
	<?php echo $this->paginator($this->list)->render();?>
</div>
